package com.eulog.client.trump;

import java.util.ArrayList;

public class TrumpHandCards {
	protected ArrayList<TrumpCard> handCards;
	
	public TrumpHandCards() {
		handCards = new ArrayList<TrumpCard>();
	}
	
	public TrumpHandCards(TrumpCard c) {
		handCards = new ArrayList<TrumpCard>();
		handCards.add(c);
	}
	
	public void clear() {
		handCards.clear();
	}
	
	@Override
	public String toString() {
		String name = "";
		for (TrumpCard c: handCards) {
			name += c.toStringRank() + " ";
		}
		return name;
		//return name + "(SIZE " + size() + ")";
	}

	public void add(TrumpHandCards cards) {
		for (TrumpCard c : cards.getHandCards()) {
			add(c);
		}
	}
	
	public void add(TrumpCard c) {handCards.add(c);}
	public ArrayList<TrumpCard> getHandCards() {return handCards;}
	public int size() {return handCards.size();};
	public TrumpCard get(int index) {return handCards.get(index);}

	public boolean hasAce() {
		for (TrumpCard c : handCards) {
			if(c.isAce()) return true;
		}
		return false;
	}
	
}
